package com.yjq.programmer.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yjq.programmer.annotation.ValidateEntity;

import java.util.Date;

/**
 * @author 杨杨吖
 * @QQ 823208782
 * @WX yjqi12345678
 * @create 2022-11-21 15:18
 */
public class MusicMenuDTO {

    private String id;

    @ValidateEntity(required=true,errorRequiredMsg="歌单所属用户不能为空！")
    private String userId;

    private String username;

    private String headPic;

    private String coverPhoto;

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;

    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=32,minLength=1,errorRequiredMsg="歌单名称不能为空！",errorMaxLengthMsg="歌单名称长度不能大于32！",errorMinLengthMsg="歌单名称不能为空！")
    private String name;

    private Integer viewNum;

    private Integer isOfficial;

    private String token;

    private Integer total; // 歌单包含的音乐数

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getHeadPic() {
        return headPic;
    }

    public void setHeadPic(String headPic) {
        this.headPic = headPic;
    }

    public String getCoverPhoto() {
        return coverPhoto;
    }

    public void setCoverPhoto(String coverPhoto) {
        this.coverPhoto = coverPhoto;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getViewNum() {
        return viewNum;
    }

    public void setViewNum(Integer viewNum) {
        this.viewNum = viewNum;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getIsOfficial() {
        return isOfficial;
    }

    public void setIsOfficial(Integer isOfficial) {
        this.isOfficial = isOfficial;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", username=").append(username);
        sb.append(", headPic=").append(headPic);
        sb.append(", coverPhoto=").append(coverPhoto);
        sb.append(", createTime=").append(createTime);
        sb.append(", name=").append(name);
        sb.append(", viewNum=").append(viewNum);
        sb.append(", token=").append(token);
        sb.append(", total=").append(total);
        sb.append(", isOfficial=").append(isOfficial);
        sb.append("]");
        return sb.toString();
    }
}
